﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


/**
* @Author: AdinZ
* @Q  Q : 1454269
* @Email:adinz@adinz.com
* @Created: 2014/3/31 16:46:33
*
* */
namespace Novel.Sys.BLL
{
    public class novel_session
    {
        Dal.novel_session dal = new Dal.novel_session();
        /// <summary>
        /// 验证是否登录
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="Passwd"></param>
        /// <returns></returns>
        public bool Exists(int Uid, string SessionKey)
        {
            return dal.Exists(Uid, SessionKey);
        }

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="Uid"></param>
        /// <param name="Session"></param>
        /// <param name="Created"></param>
        /// <param name="EndTime"></param>
        /// <returns></returns>
        public int Add(Model.novel_session model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 删除一个
        /// </summary>
        /// <param name="Uid"></param>
        public void Del(int Uid)
        {
            dal.Del(Uid);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public Model.novel_session GetModel(int uid)
        {
            return dal.GetModel(uid);
        }


        public bool Exists(int uid)
        {
            return dal.Exists(uid);
        }

        public void UpdateSession(int uid, string session, DateTime endtime)
        {
            dal.UpdateSession(uid, session, endtime);
        }

    }

}

